package com.vueperson.vueperson.t1;

import java.util.BitSet;

public abstract class P1 {
    private int i;
    public int add(int n){
        if (n <=1) {
            return 1;
        }else {
            return n+add(n-1);
        }
    }

    abstract public int ff(int n);

    public static void main(String[] args) {
       P3 p3=new P3();
       p3.create();
       p3.mm();
    }

}

class P2 extends P1{
    int p2;
    @Override
    public int ff(int n) {
        if (n <= 1) {
            return 1;
        }else {
            return n*ff(n-1);
        }

    }

    public int add(int n){
      p2=super.add(n);
        return p2;
    }


}


class P3{
    BitSet bits1 = new BitSet(16);
    BitSet bits2 = new BitSet(16);

   public void create(){
        bits1.set(1);
        bits1.set(2);
        bits1.set(3);
        bits1.set(100);

       bits2.set(3);
       bits2.set(4);
       bits2.set(5);
       bits2.set(6);
       bits2.set(6);

    }
    public void size(){
       int a=bits1.size();
        System.out.println(a);
    }

    public void mm(){
       bits1.or(bits2);
        System.out.println(bits1);
    }

}